package com.wenx.v3system.modular.platform.domain.maps;

import com.wenx.v3system.modular.platform.domain.dto.PlatformRoleDto;
import com.wenx.v3system.modular.platform.domain.po.PlatformRole;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 平台角色映射类
 * 
 * @author wenx
 */
@Mapper(componentModel = "spring")
public interface PlatformRoleMap {

    PlatformRoleMap INSTANCE = Mappers.getMapper(PlatformRoleMap.class);

    /**
     * DTO转PO
     */
    PlatformRole toPo(PlatformRoleDto dto);

    /**
     * PO转DTO
     */
    PlatformRoleDto toDto(PlatformRole po);

    /**
     * DTO列表转PO列表
     */
    List<PlatformRole> toPoList(List<PlatformRoleDto> dtoList);

    /**
     * PO列表转DTO列表
     */
    List<PlatformRoleDto> toDtoList(List<PlatformRole> poList);
} 